<template>
  <div class="map-tool">
    <div class="item">
      <div class="icon1" @click="change('0')" />
      <div class="icon2" @click="change('1')" />
    </div>
    <div class="icon3" @click="change('2')" />
    <div class="item item2">
      <div class="icon4" @click="change('3')" />
      <div class="name">定位</div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'MapTool',
  methods: {
    change(type) {
      this.$emit('change', type)
    }
  }
}
</script>

<style scoped lang="scss">
.map-tool {
  position: absolute;
  left: 36px;
  bottom: 110px;
  cursor: pointer;
  .item {
    width: 53px;
    height: 84px;
    background: rgba(255,255,255,1);
    opacity: 1;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding:17px 0;
    .icon1 {
      background-image: url("~@/assets/farmland/jia.png");
      width: 25px;
      height: 25px;
      background-repeat: no-repeat;
      background-size: 100% 100%;
    }
    .icon2 {
      background-image: url("~@/assets/farmland/jian.png");
      width: 25px;
      height: 1px;
      background-repeat: no-repeat;
      background-size: 100% 100%;
    }
  }
  .icon3 {
    background-image: url("~@/assets/farmland/quanping.png");
    width: 53px;
    height: 53px;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    margin: 14px 0;
  }
  .icon4 {
    background-image: url("~@/assets/farmland/suofang.png");
    width: 26px;
    height: 26px;
    background-repeat: no-repeat;
    background-size: 100% 100%;
  }
  .item2 {
    height: initial;
    padding: 10px 0;
    justify-content: center;
    .name {
      font-size: 15px;

      font-weight: 400;
      line-height: 15px;
      color: #6C6C6C;
      margin-top: 5px;
    }
  }
}
</style>
